﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace jnagr.Web
{
    public class indexpage : System.Web.UI.Page
    {
        public indexpage()
            : base()
        {

        }
        protected override void OnPreLoad(EventArgs e)
        {

            base.OnPreLoad(e);            
        }
       
        public string getMenu()
        {
            string umenu = "";
            if (Session["user"] != null)
            {
                DataTable dt = Session["user"] as DataTable;
                if (dt != null)
                {
                    umenu = dt.Rows[0]["umenu"].ToString();
                }
            }
            return umenu;
        }
        public bool CheckMenu(string code)
        {
            string menu = getMenu();
            bool cm= menu.Contains(code);
            return cm;
            
        }
    }
}